<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>葡萄力首页</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="css/common/common.css"/>
		
	</head>
	<body>
		<div id="web">
			
			<div class="background">
				<!--<div class="img1">
					<img src="img/background.png"/>
					
				</div>-->
				<div class="title">
					<img src="img/title.png"/>
				</div>
				<div class="start">
					<img src="img/start.png"/>
				</div>
				<div class="btn1">
					<img src="img/button1.png"/>
				</div>
				<div class="btn2">
					<img src="img/button2.png"/>
				</div>
				<div class="game">
					<img src="img/game_info.png"/>
				</div>
			</div>
			
			
		</div>
		
		
		<script type="text/javascript">
			//获取位置
			var back = document.getElementsByClassName("background")[0];
			var start = back.getElementsByClassName("start")[0];
			var btn2 = back.getElementsByClassName("btn2")[0];
			var game = back.getElementsByClassName("game")[0];
			//开始的点击事件，跳转到开始页面
			start.onclick = function(){
				window.location.href = "index2.html";
			}
			//游戏规则的弹窗事件
			btn2.onclick = function(){
				game.style.display="block";
			}
			game.onclick =function(){
				game.style.display="none";
			}
		</script>
		
		
		
		
		
		
		
		
		
		<script type="text/javascript">
			document.body.style.height = window.innerHeight + "px";
		</script>
		<script type="text/javascript">
			document.body.style.height = window.innerHeight + "px";
			/*动态改变根元素字体大小*/
			function recalc() {
				var clientWidth = document.documentElement.clientWidth;
				if(!clientWidth) return;
				document.documentElement.style.fontSize = 40 * (clientWidth / 750) + 'px';
			}
			//字体大小 = 1rem单表示了多少个像素*设备的宽度

			function initRecalc() {
				recalc();
				var resizeEvt = 'osrientationchange' in window ? 'orientationchange' : 'resize';
				if(!document.addEventListener) return;
				window.addEventListener(resizeEvt, recalc, false);
				document.addEventListener('DOMContentLoaded', recalc, false);
			}
			initRecalc();
		</script>
	</body>
</html>
